<html>
<title>Filters</title>
<body style="padding:20px;width:650px;font-family:Times">
<h1>Filters/Pairs Filters</h1>
A filtered query will result in a table of sequences (Filters) or pairs (Pairs Filter), which pass the sequences or pairs filter. Note that
sections are collapsible; to expand a section and see the filter options,
click on the "+". 

<h2>Filters</h2>

<h3>General</h3>
Filter on sequence length, total read count, and whether the sequence has
a user-added remark. Remarks can be added with the runSingleTCW interface.

<h3>Libraries</h3>
Filter based on read counts or RPKM of one or more libraries, where RPKM is the default. 
<ol>
<li>Select one or more libraries to include.
<li>Optionally select one or more libraries to exclude.
<li>Select one or more of the three conditions (<i>note, if a condition is NOT selected,
the include/excluded libraries are ignored!</i>). The table of results will have
only those sequences that meet ALL selected conditions. 
</ol>
For example, say you choose Include=libA,libB and Exclude=libC,libD:
<ol>
<li>Select the first condition (At least N from 'every' included library): this condition 
alone will show a table
of all sequences that have an RPKM of at least 1 for libA and libB, where libC
and libD are ignored (it does not matter what values they have). 
<li>Select the first two conditions: this will show all sequences that have an RPKM of
at least 1 for libA and libB and an RPKM of 0 for libC and libD.
<li>Select the last condition only with the 'Down' option: this will show all sequences where
both libA and libB are 2-fold down-regulated from libC and libD.
</ol>

<h3>DE Pvalues</h3>
This filter will only be available if the runDE function was run to add DE (Differential
expression) p-values to your database.
<ol>
<li>You must select the box next to 'Every' and enter a p-value.
<li>You must select one or more DE values. Listed here will be the columns that were
added with the runDE function.
<li>Change 'Every' to 'Any' if you wish to see results where any one of the selected DE values
meets the threshold.
</ol>
As of TCW v1.2, the database stores up/down regulation as positive/negative DE p-values, in which
case you will see options "Up/down/either" for each DE column.
 (if your database was created pre-v1.2, you can re-run runDE to get this feature). 
If you select e.g. "Up", then you will see only results for which that p-value
has a <i>positive</i> value.

<h3>Best Hit</h3>
Every annotated sequence has both a "Best Eval" annotation and a "Best Anno" annotation.
Selecting 'Annotated' shows a table of all annotated sequences. 
<p>If showing annotated,
you may select additional filters, where the resulting table must meet all of them. In 
this case, you must select 'Best Eval' or 'Best Anno' to be filtered on.
<p>A list of the annoDBs that were used for annotation is shown. You can select to
see all sequences that have their Best Eval (or Best Anno) from the selected annoDB,
e.g. show all sequences that have their best hit from fungi.
<p><i>Note: there are additional annotation queries under 'Basic DB hit query'.</i>

<h3>GO</h3>

Currently, only the The GO number, e.g. 3674 for GO:0003674, can be queried here. Additional
GO queries are available from the 'Basic GO Query'. 

<h3>SNPs and ORFs</h3>

Note, SNPs are only computed for assembled contigs, so SNP queries are not available for
imported transcript sequences. ORFs are computed in either case. 


<h2>Pairs Filters</h2>

<h3>Similarity</h3>

Pairs can be filtered on nucleotide or amino acid similarity, alignment length, and % of sequence aligned. 
   